<?php
class Redirect_model extends Base_Model
{
    public function __construct()
    {
        parent::__construct();
//        $this->load->database();
        $this->load->model('redis_model');
    }

    public function getUrl($pid)
    {
//        return $this->db->get_where('common_redirect',array('id'=>$pid))->row_array();
        return $this->redis_model->get('redirect:'.$pid);

    }
}